﻿<%@ Page Title="Seasons" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="Seasons.aspx.cs" Inherits="Seasons" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="act1" %>
<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">
    <script type="text/javascript">
        window.onload = function () {
            try {
                fadeOutStatusMinus();
                fadeOutStatusPlus();
                fadeOutEdit();
                fadeOutDelete();
            } catch (err) { }
        };
        function fadeInStatusMinus() {
            document.getElementById("MainContent_StatusMinusButton").style.opacity = 1;
            document.getElementById("MainContent_StatusMinusButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutStatusMinus() {
            document.getElementById("MainContent_StatusMinusButton").style.opacity = .5;
            document.getElementById("MainContent_StatusMinusButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function fadeInStatusPlus() {
            document.getElementById("MainContent_StatusPlusButton").style.opacity = 1;
            document.getElementById("MainContent_StatusPlusButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutStatusPlus() {
            document.getElementById("MainContent_StatusPlusButton").style.opacity = .5;
            document.getElementById("MainContent_StatusPlusButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function fadeInEdit() {
            document.getElementById("MainContent_EditButton").style.opacity = 1;
            document.getElementById("MainContent_EditButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutEdit() {
            document.getElementById("MainContent_EditButton").style.opacity = .5;
            document.getElementById("MainContent_EditButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function fadeInDelete() {
            document.getElementById("MainContent_DeleteButton").style.opacity = 1;
            document.getElementById("MainContent_DeleteButton").style.filter = 'alpha(opacity=' + 100 + ')';
        }
        function fadeOutDelete() {
            document.getElementById("MainContent_DeleteButton").style.opacity = .5;
            document.getElementById("MainContent_DeleteButton").style.filter = 'alpha(opacity=' + 50 + ')';
        }
        function doStatusMinus() {
            var answer = confirm("Biztos le szeretné tiltani az adott sorozatot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doStatusPlus() {
            var answer = confirm("Biztos engedélyezni szeretné az adott sorozatot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doEdit() {
            var answer = confirm("Biztos módosítani szeretné az adott sorozatot?")
            if (answer)
                return true;
            else
                return false;
        }
        function doDelete() {
            var answer = confirm("Biztos törölni szerené az adott sorozatot?")
            if (answer) {
                if (confirm("A sorozat törlésével a hozzá tartozó összes éved, epizód törlődni fog! Még így is szeretné folytatni a törlést?"))
                    return true;
                else
                    return false;
            }
            else
                return false;
        }
    </script>
    <asp:UpdatePanel ID="SeasonsUpdatePanel" runat="server" UpdateMode="Always">
    <ContentTemplate>
        <fieldset id="SeriesPanel">
            <div id="mainDiv" class="mainDiv" runat="server">
            <div id="toolDiv" class="toolDiv" runat="server" visible="false">
                <asp:Table ID="Table1" runat="server" Width="100%">
                    <asp:TableRow>
                        <asp:TableCell>
                            <asp:ImageButton ID="StatusMinusButton" runat="server" ImageUrl="~/images/icons/minus-icon.png" ToolTip="Sorozat letiltása" Visible="false"
                                onmouseover="fadeInStatusMinus()" onmouseout="fadeOutStatusMinus()" OnClientClick="return doStatusMinus()" onclick="StatusMinusButton_Click"/>
                            <asp:ImageButton ID="StatusPlusButton" runat="server" ImageUrl="~/images/icons/plus-icon.png" ToolTip="Sorozat engedélyezése" Visible="false"
                                onmouseover="fadeInStatusPlus()" onmouseout="fadeOutStatusPlus()" OnClientClick="return doStatusPlus()" onclick="StatusPlusButton_Click"/>
                            <asp:ImageButton ID="EditButton" runat="server" ImageUrl="~/images/icons/edit-icon.png" ToolTip="Sorozat szerkesztése"
                                onmouseover="fadeInEdit()" onmouseout="fadeOutEdit()" OnClientClick="return doEdit()" onclick="EditButton_Click"/>
                            <asp:ImageButton ID="DeleteButton" runat="server" ImageUrl="~/images/icons/delete-icon.png" ToolTip="Sorozat törlése"
                                onmouseover="fadeInDelete()" onmouseout="fadeOutDelete()" OnClientClick="return doDelete()" onclick="DeleteButton_Click"/>
                        </asp:TableCell>
                    </asp:TableRow>
                </asp:Table>
            </div>
            <asp:Table ID="SeriesContent" runat="server">
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Table ID="SeriesInfo" runat="server">
                            <asp:TableRow>
                                <asp:TableCell>
                                    <asp:Image ID="SeriesImg" runat="server" />
                                </asp:TableCell>
                                <asp:TableCell>
                                    <asp:Table runat="server">
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="SeriesHunTitle" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="SeriesOrigTitle" runat="server"></asp:Label>
                                        <asp:Label ID="SeriesStatus" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label5" runat="server" Text="Értékelés: " Font-Bold="true"></asp:Label>
                                        <act1:Rating ID="SeriesRating" runat="server" EmptyStarCssClass="emptyRatingStar" FilledStarCssClass="filledRatingStar" RatingAlign="Horizontal"
                                          WaitingStarCssClass="savedRatingStar" StarCssClass="ratingStar" MaxRating="5" OnChanged="Rating_Changed" ></act1:Rating>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label1" runat="server" Text="Megjelenés dátuma: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="SeriesReleaseDate" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label3" runat="server" Text="Műfajok: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="SeriesGenres" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label2" runat="server" Text="Rendezők: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="SeriesDirectors" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label4" runat="server" Text="Írók: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="SeriesWriters" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    <asp:TableRow><asp:TableCell>
                                        <asp:Label ID="Label6" runat="server" Text="Főszereplők: " Font-Bold="true"></asp:Label>
                                        <asp:Label ID="SeriesStars" runat="server"></asp:Label>
                                    </asp:TableCell></asp:TableRow>
                                    </asp:Table>
                                </asp:TableCell>
                            </asp:TableRow>
                        </asp:Table>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="SeriesDescription" runat="server"></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell></asp:TableCell>
                </asp:TableRow>
            </asp:Table>
            </div>
        </<fieldset>
        <h2>
            Évadok
        </h2>
        <asp:Panel ID="SeasonsPanel" runat="server">

        </asp:Panel>
        <h2>
            Kommentek
        </h2>
        <fieldset id="CommentPanelForm">
            <asp:Table ID="CommentForm" runat="server">
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label8" runat="server" Text="Hozzászólás tárgya: "></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:TextBox ID="CommentTitle" runat="server" Width="400px" AutoPostBack="false"></asp:TextBox>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:Label ID="Label10" runat="server" Text="Hozzászólás szövege: "></asp:Label>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell>
                        <asp:TextBox ID="CommentContent" runat="server" Width="400px" 
                        AutoPostBack="false" Height="100px" TextMode="MultiLine"></asp:TextBox>
                    </asp:TableCell>
                </asp:TableRow>
                <asp:TableRow>
                    <asp:TableCell HorizontalAlign="Right">
                        <asp:Button ID="CommentSubmit" runat="server" Text="Hozzászólok" onclick="CommentSubmit_Click"/>
                    </asp:TableCell>
                </asp:TableRow>
            </asp:Table>
        </<fieldset>
        <asp:Panel ID="CommentPanelList" runat="server">
        
        </asp:Panel>
    </ContentTemplate>
    </asp:UpdatePanel>
</asp:Content>